<template>
  <BaseLayout>
    <ul class="list">
      <li class="item" v-for="(e, i) of list" :key="i">
        <van-button @click="skip(e.url)" type="primary">{{
          e.title
        }}</van-button>
      </li>
    </ul>
  </BaseLayout>
</template>

<script>
import { BaseLayout } from '@/layout'
import { Button } from 'vant'
export default {
  name: 'Home',
  components: {
    BaseLayout,
    [Button.name]: Button
  },
  data () {
    return {
      list: [
        {
          title: '设备台账',
          url: '/standingBook'
        },
        {
          title: '维修',
          url: '/service'
        },
        {
          title: '设备维保',
          url: '/maintain'
        },
        {
          title: '巡检管理',
          url: '/polling'
        },
        {
          title: '电子巡更',
          url: '/electronic'
        },
        {
          title: '任务大厅',
          url: '/taskhall'
        },
        {
          title: '报表查看',
          url: '/reportform'
        },
        {
          title: '首页综合表单',
          url: '/form'
        },
        {
          title: '巡更单详情',
          url: '/electronicDetail'
        },
        {
          title: '报表统计',
          url: '/reportStatistics'
        }
      ]
    }
  },
  methods: {
    skip (url) {
      this.$router.push(url)
    }
  }
}
</script>

<style lang="less" scoped>
.list {
  > .item {
    margin-bottom: 10px;
  }
}
</style>
